package com.liu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class UserController {

    @GetMapping("/user")
    public Map query(){
        Map map = null;
        map.put("code",0);
        return map;
    }


   /* @ExceptionHandler(NullPointerException.class)
    public Map handler(NullPointerException e) {
        Map map = new HashMap();
        map.put("code",0);
        map.put("msg",e.getMessage());
        return map;
    }*/




}
